﻿@model BetterTaskList.Models.Ticket

<link rel="stylesheet" href="@Url.Content("~/Content/jquery.ui.plupload.css")" type="text/css" />

<script type="text/javascript" src="@Url.Content("~/Scripts/plupload/plupload.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/plupload/jquery.ui.plupload.js")"></script>

<script type="text/javascript" src="@Url.Content("~/Scripts/plupload/plupload.flash.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/plupload/plupload.silverlight.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/plupload/plupload.html5.js")"></script>

    <div id="sidebar-uploader" style="">
        <p>You browser doesn't have Flash, Silverlight, Gears, BrowserPlus or HTML5 support.</p>
    </div>


@* visit http://www.plupload.com/documentation.php for documentation on plupload*@

<script type="text/javascript">

   
    $(function () {

        $("#sidebar-uploader").plupload({
            runtimes: 'flash,silverlight,html5',
            url: '@Url.Content("~/FileManager/Upload/")?attachmentType=tickets&attachmentValue=@Model.TicketId',
            flash_swf_url : '@Url.Content("~/scripts/plupload/plupload.flash.swf")',
            silverlight_xap_url: '@Url.Content("~/scripts/plupload/plupload.silverlight.xap")',

            max_file_size: '10mb',
            max_file_count: 10,
            chunk_size: '50kb',
            multipart : true,
            unique_names: false,

            filters: [
            { title: "All Files", extensions: "txt,csv,jpg,gif,png,bmp,zip,rar,avi,doc,docx,xls,xlsx,ppt,pptx,pdf"}]

        });

    });
</script>

